import {createStore, applyMiddleware, compose} from 'redux';
import thunk                    from 'redux-thunk';
import reducers                 from './reducers';

import './ui/components/index';


import {fetchProfileFromServer, fetchCurrentFromServer} from './actions/user';


const store = createStore(reducers, compose(
  applyMiddleware(thunk),
  window.devToolsExtension && window.devToolsExtension()
));

store.dispatch(fetchCurrentFromServer());

export default store;